# src/schemas/sys_user.py
from pydantic import BaseModel
from datetime import date, datetime


class SysUserBase(BaseModel):
    # api_id: str | None = None
    login_id: str | None = None
    user_name: str | None = None
    # login_password: str | None = None
    role: str | None = None
    email: str | None = None
    person_id: str | None = None
    is_superuser: bool = False
    is_staff: bool = True
    effective_date: date | None = None
    expiry_date: date | None = None
    deletion_mark: bool = False
    deletion_reason: str | None = None
    deletion_date: datetime | None = None
    deletion_by: str | None = None
    create_date: datetime | None = None
    creator_by: str | None = None
    last_updated_date: datetime | None = None
    last_updated_by: str | None = None


class SysUserCreate(SysUserBase):
    api_id: str | None = None


class SysUser(SysUserBase):
    id: str

    class Config:
        from_attributes = True
        # orm_mode = True


class SysUsers(SysUserBase):
    id: str
    api_id: str | None = None
    login_password: str | None = None

    class Config:
        from_attributes = True
        # orm_mode = True
